﻿using System;
using System.Web.UI;

namespace Contacts.Web
{
   public abstract class BasePage: Page
   {
      protected abstract void PageLoad();

      protected void Page_Load(object sender, EventArgs e)
      {
         if (Session["Authorized"] == null || (bool)Session["Authorized"] == false)
         {
            Response.Redirect("Login.aspx");
         }

         //throw new Exception("Hello!");

         PageLoad();
      }
   }
}
